home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 3 / BBS in a box - Trilogy III.iso / Files / Tele / G / Generic Tabby Documentation
Encoding:
Text File  |  1989-07-09  |  13.9 KB  |  361 lines  |  [TEXT/QED1]

  1. Tabby Version 2.0 Generic File Format Specification
  2.  
  3. by Michael E. Connick
  4.  
  5.  
  6. Purpose
  7.  
  8. The purpose of this document is to provide a description of the
  9. new Tabby Version 2.0 Generic Message File Format. It will
  10. also provide a functional description for Import and Export
  11. procedures required in BBS programs to make use of this file
  12. structure.
  13.  
  14.  
  15. Introduction
  16.  
  17. Version 2.0 of Tabby will include a major change in design
  18. philosophy over previous versions of Tabby. Instead of creating
  19. a customized version of Tabby for each BBS to be supported, a
  20. single "generic" version of Tabby will be created.
  21.  
  22. This will be accomplished having Tabby pick up and deliver
  23. netmail and Echomail messages from "generic" message files.
  24. These generic message files represent a virtual BBS message
  25. structure that Tabby 2.0 will support. Tabby 2.0 will ONLY
  26. support these generic message files. It will no longer directly
  27. support individual BBS message system architectures.
  28.  
  29. Any BBS that intends to support Tabby will be required to
  30. provide Generic File Import and Export procedures. These
  31. procedures may be standalone programs or integrated routines
  32. within the BBS program. In any case, their function will be to
  33. provide an interface between the native BBS message file
  34. structure and the Tabby Generic Message File structure.
  35.  
  36. The function of the Import procedure will be to Import netmail
  37. and Echomail messages from the Generic Import File and deliver
  38. them in the proper format to the BBS mail and public message
  39. systems. The Export procedure will perform the opposite
  40. function. It will take newly entered outgoing netmail messages
  41. and messages posted to Echomail message sections of the BBS
  42. and deliver them in the proper format to the Generic Export
  43. file.
  44.  
  45.  
  46. Generic File Format
  47.  
  48. The Tabby Generic file format will actually consist of two
  49. independent files having an indentical structure. These files
  50. are the Generic Import file and the Generic Export file. The
  51. Import file will contain messages which must be imported into
  52. the BBS by the Import procedure. The Export file will contain
  53. outgoing BBS netmail and Echomail messages placed there by
  54. the Export procedure.
  55.  
  56. Since both the Generic Import and Generic Export files have an
  57. identical format they will be collectively refered to as the
  58. Generic file.
  59.  
  60. The format of the Generic file has been designed with the goal
  61. of being extremely easy for programmers to deal with it. The
  62. structure of the file is extremely simple and straight
  63. forward. The file format was created in such a manner that
  64. programmers writing the Import and Export procedures could
  65. easily use just about any Mac programming language to access
  66. the file. In addition the design was influenced by the desire
  67. to make the file formats very easy to use when debugging
  68. Import and Export procedures.
  69.  
  70. The basic philosophy behind the Generic file format is that
  71. each field will always contain printable ASCII characters or a
  72. NULL and will be terminated by a carriage return character.
  73. Following is a more detail description of the format:
  74.  
  75.  
  76. Tabby Generic File Record
  77.  
  78. Record Flags
  79. Category Number
  80. Message Date
  81. Message Time
  82. Originating or Destination Node
  83. From
  84. To
  85. Subject
  86. Text Lines (optional)
  87. NULL Line
  88.  
  89.  
  90. Record Flags - 4 bytes (including terminating carriage return)
  91.  
  92.     Flag Byte 1 -Deletion Flag
  93.         Equal to 'D' if record deleted
  94.     Flag Byte 2 -Record Type
  95.         Equal to 'E' if Echomail
  96.         Equal to 'M' if netmail
  97.     Flag Byte 3 -Reserved for future use
  98.         Ignore
  99.     Flag Byte 4 -Always a carriage return (CR)
  100.  
  101. Category Number - 4 bytes (including terminating CR)
  102.  
  103. This field is used only with Echomail, it should be
  104. ignored for netmail. The field contains three ASCII
  105. numeric characters representing the category number
  106. for the Echomail conference this message is associated
  107. with. This category number is the BBS public message
  108. section number that contains messages for this Echomail
  109. conference.  The number corresponds to the Echomail
  110. Area category number specified by the Tabby Maint program
  111. and contained in the "areas.bbs" Tabby file. The field
  112. will always be three digits in length and will have
  113. leading zeroes if the number is less than three digits.
  114.  
  115. Message Date - 9 bytes (including terminating CR)
  116.  
  117. This field contains contains an 8 character date.
  118. The format of the date field is as follows:
  119.  
  120. MM/DD/YY
  121.  
  122. where MM is a two digit month number, DD a two digit
  123. day of the month, and YY a two digit year. Each of
  124. these will have a leading zero if less than two
  125. digits.
  126.  
  127. Message Time - 9 bytes (including terminating CR)
  128.  
  129. This field contains contains an 8 character time.
  130. The format of the time field is as follows:
  131.  
  132. HH:MM:SS
  133.  
  134. where HH is a two digit hour (military or 24 hour time)
  135. number, MM a two digit minutes, and SS a two digit
  136. seconds. Each of these will have a leading zero if less
  137. than two digits.
  138.  
  139. Originating or Destination Node - variable length not to
  140. exceed 16 characters (including terminating CR)
  141.  
  142. This field contains the originating node number of the
  143. message in the Generic Import file, and the
  144. destination node for the message in the Generic Export
  145. file. This will contain a standard Fidonet compatible
  146. node address, WITHOUT zone. For example our Fidonet
  147. node number would be represented in this field as:
  148.  
  149. 107/512
  150.  
  151. From - variable length not to exceed 80 bytes (including
  152. terminating CR)
  153.  
  154. This field contains the name of the person who
  155. composed the message.
  156.  
  157. To - variable length not to exceed 80 bytes (including
  158. terminating CR)
  159.  
  160. This field contains the name of the person to whom
  161. the message is addressed.
  162.  
  163. Subject - variable length not to exceed 80 bytes (including
  164. terminating CR)
  165.  
  166. This field contains subject of the message.
  167.  
  168. Text Lines (0 to a maximum of 400) - each line variable
  169. length not to exceed 90 bytes (including terminating CR)
  170.  
  171. These fields will contain the actual text of the
  172. message. They are optional, i.e., a message can be
  173. sent with only header information and no text
  174. associated with it.
  175.  
  176. Line containing a NULL - 2 bytes (including terminating CR)
  177.  
  178. This line will terminate the message and will consist
  179. of a single NULL character (byte containing zero).
  180. This is the ONLY use of the NULL character in the
  181. Generic file. NULL characters must NOT appear in any
  182. of the other fields. They may only contain printable
  183. ASCII characters.
  184.  
  185.  
  186. Import Procedure Functional Specification
  187.  
  188. The Import procedure is responsible for taking netmail and
  189. Echomail messages out of the Generic Import file, reformatting
  190. them, and putting them in the appropriate BBS file.
  191.  
  192. As each message is processed and delivered to the BBS, the
  193. corresponding Delete flag in the record should be set equal to
  194. a 'D' and the record rewritten into the file. This will
  195. prevent messages from being delivered multiple times into the
  196. BBS. Obviously this also implies that the Import procedure
  197. should ignore any record in the Import file that has a delete
  198. flag equal to 'D'.
  199.  
  200. The Import procedure should next check the Record Type Flag
  201. field to determine if the message is netmail or Echomail. If
  202. it's a netmail message it can be directly delivered into the
  203. BBS's mail system. If it's an Echomail message, the Category
  204. Number field will need to be checked to determine which public
  205. message section the message should be delivered to.
  206.  
  207. The processing of the Date, Time, Originating Node, From, and
  208. To fields should be quite simple. Most likely the Message Date
  209. field will require reformatting to be acceptable to the BBS.
  210.  
  211. The Text Line formatting is probably the most complex function
  212. of the Import program. First of all, remember that a message
  213. may have NO text lines associated with it. This is quite
  214. common for messages which are used to transmit file
  215. attachments and ArcMail.
  216.  
  217. Next, the Text Line fields will probably require reformatting
  218. to the appropriate line length required by the BBS program.
  219. They are simply guaranteed not to exceed 90 characters in
  220. length. Blank lines between paragraphs will contain only a
  221. carriage return and no other text characters.
  222.  
  223. The end of the message text is indicated by a NULL line. This
  224. will contain a single NULL followed by the normal carriage
  225. return line terminator.
  226.  
  227. Upon completing processing of the Generic Import file, the Import
  228. function should delete this file.
  229.  
  230.  
  231. Export Procedure Functional Specification
  232.  
  233. The Export procedure is responsible for finding newly entered
  234. netmail and Echomail messages in the BBS, reformatting them,
  235. and appending them to the Generic Export file. The Generic
  236. Export file should alway be appended to if it exists, or
  237. created if it does not exist.
  238.  
  239. The Export procedure will need to have a method of determining
  240. which BBS netmail and Echomail messages have been posted since
  241. the last time the Export procedure was executed. Otherwise,
  242. the same messages are going to end up being sent out by Tabby
  243. over and over again. The Export procedure may accomplish this
  244. by saving the date/time of the last time it was run, or by
  245. keeping track of the highest message number last processed.
  246.  
  247. In addition the Export procedure is going to need to
  248. distinguish between Echomail messages entered by the BBS
  249. users, and those that were delivered by the Import procedure
  250. from Tabby. Only those messages that were entered by the BBS
  251. users can be put into the Generic Export file. Tabby itself
  252. will take care of distributing Echomail messages received to
  253. additional Echomail partner systems. For example if you're
  254. polling System A to pick up an Echo and System B is polling you
  255. to get messages for that Echo, Tabby will take care of making
  256. sure that copies of the Echomail messages picked up from
  257. System A are sent to System B. The Export procedure needs to
  258. ONLY deal with messages entered on the BBS by the users of the
  259. BBS.
  260.  
  261. The Export procedure will need to set the Record Type Flag
  262. field to indicate whether each message it is placing in the
  263. Generic Export file is netmail or Echomail. If it's a netmail
  264. message the Record Type Flag must be set to a 'M'. If it's an
  265. Echomail message the Record Type Flag must be set to an 'E'.
  266.  
  267. If the message is an outgoing Echomail message, the Category
  268. Number field should contain the BBS message section number of
  269. the message, properly formatted as a three digit ASCII number
  270. with leading zeroes. If the message is netmail, the Category
  271. Number field should be set to three ASCII '0' digits.
  272.  
  273. The Destination Node field should only contain a node number
  274. if the message is a netmail message. The Destination Node field
  275. will be ignored for outgoing Echomail messages.
  276.  
  277. The processing of the Date, Time, From, and To fields should
  278. be quite simple. Most likely the Message Date field will require
  279. reformatting from the native BBS format into the Generic Export
  280. file format.
  281.  
  282. The Text Line formatting is also quite simple. Remember that
  283. Text Line fields MUST be terminated by a carriage return and
  284. MUST NOT exceed 90 characters in length, INCLUDING the
  285. terminating carriage return. Blank lines between paragraphs
  286. will contain only a single carriage return.
  287.  
  288. The end of the message text is indicated by a NULL line. This
  289. will contain a single NULL followed by the normal carriage
  290. return line terminator. Be sure to output this NULL line to
  291. the Generic Export file.
  292.  
  293.  
  294. Additional BBS Interface Files
  295.  
  296. Two additional files complete the interface between Tabby and the BBS:
  297. the Generic file, and the Next Event file. Both of theses files will be
  298. found in the same folder as the BBS program and the Tabby programs.
  299.  
  300. The Generic file will contain an absolute path name of the folder in
  301. which the Generic Import and Generic Export files reside. This path name
  302. will be terminated by a ":" character following by a carriage return.
  303.  
  304. The Next Event file will contain an 8 character record terminated by
  305. a carriage return. The record consists of ASCII digits representing the
  306. starting and ending time of the next time the Tabby system should be
  307. started up. These times are in "military" or "24 hour" format. For example
  308. if the starting and ending times for the next Tabby Event were 9:00 AM and
  309. 1:00 PM, the Next Event record would contain the following:
  310.  
  311. 09001300
  312.  
  313. When the BBS detects that the current time falls within this time period,
  314. it should terminate the current caller and launch TabbyNet. The TabbyNet
  315. program (and all other Tabby programs) will be located in the same folder
  316. as the BBS, so launching it should be quite easy. The Tabby system will
  317. automatically re-launch the BBS when its Event processing is completed.
  318.  
  319. The Tabby system is capable of supporting multiple Events in a single day,
  320. so the BBS should check the Next Event file everytime it is launched.
  321.  
  322.  
  323. Handling "Crashmail"
  324.  
  325. The Fidonet network protocol supported by Tabby allows for both scheduled
  326. and unscheduled connection to take place. Unscheduled connections are
  327. usually refered to as Crashmail. For a BBS program to take full advantage
  328. of Tabby, it should be capable of supporting the receipt of Crashmail. To
  329. do this, it needs to be able to differentiate between human and Fidonet
  330. callers. This is accomplished by looking for a TSYNC character in the
  331. normal login input sequence. This character has a hex value of AE. Receipt
  332. of this character should cause the BBS to take the following action:
  333.  
  334. 1. Create a file in the current folder named connect.bbs and containing
  335. a single carriage return terminated record. The first character of this
  336. record should contain an "a" if the BBS modem is attached to the serial
  337. port, and a "b" if the BBS modem is attached to the printer port. The next
  338. characters should contain ASCII digits giving the baud rate of the
  339. connection. For example if the BBS has its modem attached to the serial
  340. port and a 9600 baud connection is made to it that turns out to be a
  341. Fidonet call, the BBS should create a connect.bbs file containing the
  342. following record:
  343.  
  344. a9600
  345.  
  346. 2. After writing out and closing the connect.bbs file, the BBS program
  347. should launch the TabbyNet program.
  348.  
  349.  
  350. Questions?
  351.  
  352. This concludes the interface requirements of BBS when used with Tabby 2.0.
  353. If you have any questions about the information contained in this
  354. document, feel free to get in contact with me. I can be reached over
  355. Fidonet at 107/412, over Alternet at 520/412, on our BBS at 300/1200/
  356. 2400/9600 HST baud at 201-988-0706, or via US Mail at:
  357.  
  358. ME Connick and Company
  359. PO Box 307
  360. Bradley Beach, NJ 07720
  361.